import request from "@/utils/request"

export default
{
  /**
   * 分页多条件查询用户答题记录
   * @param current
   * @param limit
   * @param userSurveyQuery
   * @returns {AxiosPromise}
   */
  pageUserSurveyCondition(current,limit,userSurveyQuery)
  {
    return request
    ({
      method:"POST",

      url:`/survey/listUserSurvey/${current}/${limit}`,

      data:userSurveyQuery
    })
  },

  /**
   * 修改用户的某个答题记录
   * @param updateUserSurveyDTO
   * @returns {AxiosPromise}
   */
  updateUserSurvey(updateUserSurveyDTO)
  {
    return request
    ({
      method:"POST",

      url:'/survey/updateUserSurvey',

      data:updateUserSurveyDTO
    })
  },

  /**
   * 通过答题记录id删除用户的某个答题记录
   * @param updateUserSurveyDTO
   * @returns {AxiosPromise}
   */
  deleteUserSurveyById(id)
  {
    return request
    ({
      method:"GET",

      url:`/survey/deleteUserSurveyById/${id}`,

    })
  },
}
